<?
require('./application/views/header.php');

?>


		
    	<div id="content">

            	<h2>Lessen overzicht</h2>
                
             <? if(count($this -> lessen) == 0){
			 echo '<div class="errorDiv">Er zijn nog geen lessen aanwezig</div>';
			 }else{
			 
			 ?>
            	     <? if($this -> exists('prevPage') || $this -> exists('nextPage')){ ?>   
				 <ul class="page_menu">
            <? if($this -> exists('prevPage')){ ?>
            <li><a href="/lessen/<?=$this -> prevPage?>/" class="backBtn">Vorige</a></li>
            <? }
				if($this -> exists('nextPage')){
			 ?>
            <li><a href="/lessen/<?=$this -> nextPage?>/" class="forBtn">Volgende</a></li>
            <?
			}
			?>
            </ul>
				
				
				<? } ?>
                
              <table class="inabuurt" cellpadding="0" cellspacing="0">
            	<tr>
                	<th>Titel:</th>
                    <th>Datum:</th>
                    
                </tr>
                <? foreach ($this -> lessen as $value)
					{
												
									?>
				<tr>
                	<td><a href="<?= $value -> les_path?>"><?= $value ->  title ?></a></td>
                    <td><?= $value -> datum?></td>
                </tr>
               <? } ?>
            </table>         
            
                 <? if($this -> exists('prevPage') || $this -> exists('nextPage')){ ?>   
				 <ul class="page_menu">
            <? if($this -> exists('prevPage')){ ?>
            <li><a href="/lessen/<?=$this -> prevPage?>/" class="backBtn">Vorige</a></li>
            <? }
				if($this -> exists('nextPage')){
			 ?>
            <li><a href="/lessen/<?=$this -> nextPage?>/" class="forBtn">Volgende</a></li>
            <?
			}
			?>
            </ul>
				
				
				<? } }?>
            
            
    </div>
<? include('footer.php'); ?>